/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.service.members;
import com.alibaba.fastjson.JSONObject;
import com.qinyetech.springstage.core.service.IBaseService;
import com.qinyeit.serviceapp.entity.MemberCardType;

import java.util.List;

/** 
 * ClassName: MemberCardTypeService <br/> 
 * Function: 会员卡类型业务功能 <br/> 
 * date: 2018-12-03 14:58:01 <br/> 
 * 
 * @author DESKTOP-DHS6NG3
 * @version 1.0
 * @since JDK 1.8
 */
public interface MemberCardTypeService extends IBaseService<MemberCardType, Long>{

    /**
     * 保存会员卡类型
     * @param data
     *    types:{
     *        name:名称
     *        discountId:折扣方案‘
     *        hasVipPrice：是否启用会员价
     *        hasConsumeRecharge：是否消费返积分
     *        consumePrice：消费金额
     *        giftPoint：赠送积分
     *        rechargeRule：充值规则
     *        rechargeType：充值规则类型
     *    }
     *    branchs:[1,2]适用门店id
     *    rules:[{
     *
     *        rangeStart:充值开始金额
     *        rangeEnd:充值结束金额
     *        giftMoney：赠送金额
     *        giftPoint： 赠送积分
     *    }]
     * @param merchantGroupId
     * @param operator
     */
    void saveData(JSONObject data,Long merchantGroupId,String operator);

    /**
     * 修改单店的会员卡类型 删除
     * @param id 会员卡类型id
     * @param merchantGroupId
     */
    void updateData(Long id, Long merchantGroupId);

    /**
     * 获取会员卡适用门店
     * @param id
     * @param merchantGroupId
     */
    List<Long> getBranchList(Long id, Long merchantGroupId);
}